package com.lonelymeko.shishou.service;

import com.lonelymeko.summer.Autowired;
import com.lonelymeko.summer.Component;
import com.lonelymeko.summer.InitializingBean;
import com.lonelymeko.summer.Scope;

@Component("userService")
@Scope("prototype")
//@NoArgsConstructor
public class UserService implements  UserServiceInterface,InitializingBean{

    public void afterPropertiesSet() {
        //初始化方法
        System.out.println("UserService初始化方法");
    }

    @Autowired
    private OrderService orderService;

    public UserService(OrderService orderService) {
        this.orderService = orderService;
        System.out.println("UserService构造函数" + orderService);
    }


    public void addUser() {
        System.out.println("添加用户");
    }
}
